require 'RS2TF/test_config'

    def self.evaluate_testdata(inputdata)
      variablename = inputdata[/\{[a-z0-9_]+\}/]
      if variablename.nil? || @testdata.nil?
        inputdata
      else
        keyname = variablename[1, variablename.length-2]
        if @testdata[keyname].nil?
          inputdata
        else
          inputdata.sub(variablename, @testdata[keyname])
        end
      end
    end

lang = RS2TF::TestConfig.getinstance
puts lang.gettext("pagepart1.hello").inspect
puts lang.getlocator("pagepart1.hello").inspect
puts lang.getstatusdata("pagepart1.hello").inspect
puts lang.getactiondata("pagepart1.hello").inspect
puts lang.getenvdata("pagepart1.hello").inspect


@testdata = {"username"=>"junma", "password_1"=>"aaaa"}
puts evaluate_testdata("test {password_2} test")
